import {CProFormProps} from "@/components/CProForm/type";
import ProForm from "@ant-design/pro-form";
import CFormItem from "@/components/CProForm/CFormItem";

export default (props: CProFormProps) => {

  return (
    <ProForm {...props}>
      {
        props.groupList.map(group => {
          return (
            <ProForm.Group>
              {group.itemList.map(item => {
                return (<CFormItem  {...item}/>)
              })}
            </ProForm.Group>
          )
        })
      }{props.children}
    </ProForm>
  )
}
